package com.data.datalib.http

import com.data.datalib.ASSycBuilder
import com.data.datalib.util.removePathSeparator

object ASUrlHelper {

    fun combineUrl(): String {
        ASSycBuilder.zone = ASSycBuilder.zone.removePathSeparator()
        ASSycBuilder.pathCommon = ASSycBuilder.pathCommon.removePathSeparator()

        if (ASSycBuilder.host.isBlank() or ASSycBuilder.zone.isBlank() or ASSycBuilder.pathCommon.isBlank()) {
            return ""
        }

        return ASSycBuilder.host + "/" + ASSycBuilder.zone + "/" + ASSycBuilder.pathCommon
    }

}